# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementV1AppDetails do
  @moduledoc """
  Resource representing app details.

  ## Attributes

  *   `androidAppInfo` (*type:* `GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementV1AndroidAppInfo.t`, *default:* `nil`) - Output only. Android app information.
  *   `appId` (*type:* `String.t`, *default:* `nil`) - Output only. Unique store identifier for the item. Examples: "gmbmikajjgmnabiglmofipeabaddhgne" for the Save to Google Drive Chrome extension, "com.google.android.apps.docs" for the Google Drive Android app.
  *   `chromeAppInfo` (*type:* `GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementV1ChromeAppInfo.t`, *default:* `nil`) - Output only. Chrome Web Store app information.
  *   `description` (*type:* `String.t`, *default:* `nil`) - Output only. App's description.
  *   `detailUri` (*type:* `String.t`, *default:* `nil`) - Output only. The uri for the detail page of the item.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - Output only. App's display name.
  *   `firstPublishTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. First published time.
  *   `homepageUri` (*type:* `String.t`, *default:* `nil`) - Output only. Home page or Website uri.
  *   `iconUri` (*type:* `String.t`, *default:* `nil`) - Output only. A link to an image that can be used as an icon for the product.
  *   `isPaidApp` (*type:* `boolean()`, *default:* `nil`) - Output only. Indicates if the app has to be paid for OR has paid content.
  *   `latestPublishTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Latest published time.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Output only. Format: name=customers/{customer_id}/apps/{chrome|android|web}/{app_id}@{version}
  *   `privacyPolicyUri` (*type:* `String.t`, *default:* `nil`) - Output only. The URI pointing to the privacy policy of the app, if it was provided by the developer. Version-specific field that will only be set when the requested app version is found.
  *   `publisher` (*type:* `String.t`, *default:* `nil`) - Output only. The publisher of the item.
  *   `reviewNumber` (*type:* `String.t`, *default:* `nil`) - Output only. Number of reviews received. Chrome Web Store review information will always be for the latest version of an app.
  *   `reviewRating` (*type:* `number()`, *default:* `nil`) - Output only. The rating of the app (on 5 stars). Chrome Web Store review information will always be for the latest version of an app.
  *   `revisionId` (*type:* `String.t`, *default:* `nil`) - Output only. App version. A new revision is committed whenever a new version of the app is published.
  *   `serviceError` (*type:* `GoogleApi.ChromeManagement.V1.Model.GoogleRpcStatus.t`, *default:* `nil`) - Output only. Information about a partial service error if applicable.
  *   `type` (*type:* `String.t`, *default:* `nil`) - Output only. App type.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :androidAppInfo =>
            GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementV1AndroidAppInfo.t() | nil,
          :appId => String.t() | nil,
          :chromeAppInfo =>
            GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementV1ChromeAppInfo.t() | nil,
          :description => String.t() | nil,
          :detailUri => String.t() | nil,
          :displayName => String.t() | nil,
          :firstPublishTime => DateTime.t() | nil,
          :homepageUri => String.t() | nil,
          :iconUri => String.t() | nil,
          :isPaidApp => boolean() | nil,
          :latestPublishTime => DateTime.t() | nil,
          :name => String.t() | nil,
          :privacyPolicyUri => String.t() | nil,
          :publisher => String.t() | nil,
          :reviewNumber => String.t() | nil,
          :reviewRating => number() | nil,
          :revisionId => String.t() | nil,
          :serviceError => GoogleApi.ChromeManagement.V1.Model.GoogleRpcStatus.t() | nil,
          :type => String.t() | nil
        }

  field(:androidAppInfo,
    as: GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementV1AndroidAppInfo
  )

  field(:appId)

  field(:chromeAppInfo,
    as: GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementV1ChromeAppInfo
  )

  field(:description)
  field(:detailUri)
  field(:displayName)
  field(:firstPublishTime, as: DateTime)
  field(:homepageUri)
  field(:iconUri)
  field(:isPaidApp)
  field(:latestPublishTime, as: DateTime)
  field(:name)
  field(:privacyPolicyUri)
  field(:publisher)
  field(:reviewNumber)
  field(:reviewRating)
  field(:revisionId)
  field(:serviceError, as: GoogleApi.ChromeManagement.V1.Model.GoogleRpcStatus)
  field(:type)
end

defimpl Poison.Decoder,
  for: GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementV1AppDetails do
  def decode(value, options) do
    GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementV1AppDetails.decode(value, options)
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementV1AppDetails do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
